﻿@using Fuse8.ContentManagementFramework.Web.ApplicationRuntime
@{var user = Request.CurrentUser();
  var site = Request.CurrentSite();
  var host = Request.CurrentHost();
  var availableSites = new SelectList(Request.AvailableSitesForCurrentUser(), "Id", "SiteName", site.Id);
  ResFile = "cms_Common";
}

<div class="b-header__inner g-clear">
    <a class="b-logo logo" href="@host">@site.SiteName</a>

@if (Request.IsAuthenticated){
    <dl class="b-user">		
        <dt class="b-user__dt">@Html.Raw(_("Welcome <a href=\"{0}\">{1}</a>", Url.Content("~/admin/cmsuser/edit/") + user.Id, user.UserName))</dt>
        <dd class="b-user__dd">@Html.Raw(_("Site: <a href=\"{0}\" target=\"_blank\">{1}</a>", host, site.SiteName))
            @if (availableSites.Count() > 1)
            {
                <text> &nbsp;@_("Change website"): @Html.DropDownList("availableSites", availableSites, new { @class = "js-switch-site b-select" })</text>
            }
        </dd>
        <dd class="b-user__dd">
            <nav class="b-sub-nav" role="navigation">
                <ul>
                    <li><a href="@Url.Content("~/admin/account/logoff")">@_("Logout")</a></li>			
                </ul>
            </nav>	
        </dd>				
    </dl>
}
    
    @{ Html.RenderAction("SearchSnippet", "CmsSearch", new {area = CmsRoute.AdministrationAreaName}); }

</div>
<nav class="b-main-nav" role="navigation">
	<div class="b-main-nav__i">
        @{Html.RenderAction("menuMap", new { @class = "ul-section", area = CmsRoute.AdministrationAreaName });}
	</div>
</nav>